﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace week2.classes
{
    class CreditAccount : Account
    {
        public CreditAccount(string username,string pwd) : base(username, pwd) { }
        public new bool WithDraw(int money)
        {
            if (money > 10000)
            {
                BigMoney bm = new BigMoney();
                bm.money = money;
                bm.UserName = Username;
                SendEvent(bm);
            }
            Balance -= money;
            return true;
        }
    }
}
